package com.hxexp.weixin.test.api;

import java.util.ArrayList;
import java.util.List;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import com.hxexp.weixin.common.exception.APIException;
import com.hxexp.weixin.hpe.api.bindpassenger.BindPassengerAPI;
import com.hxexp.weixin.hpe.api.bindpassenger.model.BindPassengerParamBean;
import com.hxexp.weixin.hpe.api.bindpassenger.model.BindPassengerResultBean;
import com.hxexp.weixin.test.runner.JUnit4WithSpringLogClassRunner;

/**
 * 绑定乘客到订单接口实现类测试
 *
 * @author wang.bin
 *
 */
@RunWith(JUnit4WithSpringLogClassRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@ContextConfiguration(locations = { "classpath:conf/spring/spring-biz.xml", "classpath:conf/spring/spring-ehcache.xml" })
public class BindPassengerAPIImplTester {

    @Autowired
    private BindPassengerAPI bindPassengerAPI;

    @Test
    public void testCase01() throws APIException {

        BindPassengerParamBean bindPassengerParamBean = new BindPassengerParamBean();
        BindPassengerResultBean returnValue = new BindPassengerResultBean();
        List<String> list = new ArrayList<String>();
        list.add("f5a5444b209543428b01b5c0b70fcdd0");
        // list.add("2cd9a084372d46b1ba92355f9efeeb32");
        // 设置请求参数
        bindPassengerParamBean.setOrderId("9f453861286b49c2a6ba380842690701");
        bindPassengerParamBean.setPassengerIds(list);

        returnValue = bindPassengerAPI.bindPassenger(bindPassengerParamBean);
        System.out.println(returnValue);
    }
}
